/**
 * 注：组件内部使用其他组件时，无需通过 import xxx from 'xxx'
 * 直接使用 <xt-xxx></xt-xxx> 即可
 */
import type { App, Plugin } from "vue";

import directive from "../directive";

// 导入组件
import * as components from "./imports";

// 导出所有组件（提供按需加载的方式）
export * from "./imports";

// 注册所有组件
export default {
  install(app: App) {
    app.use(directive);

    for (let i in components) {
      app.use((components as { [propName: string]: Plugin })[i]);
    }
  },
} as any;
